<?php

/**
 * author : Tran Minh Toan
 */

class Zend_View_Helper_showTableProducer{
    
    public function showTableProducer($view){
        
        $arrProducer = $view->arrProducer;
        
        $strHtml = '';
        $strHtml .= '<table class="hovertable">';
        $strHtml .= '<tr>';
        $strHtml .= '<th>ID Producer</th>';
        $strHtml .= '<th>Tên Producer</th>';
        $strHtml .= '</tr>';
        
        if(isset ($arrProducer)){
            foreach ($arrProducer as $Producer) {
                $strHtml .= '<tr id="tablerow">';
                $strHtml .= '<td>'.$Producer->user_id_customer.'</td>';
                $strHtml .= '<td>'.$Producer->product_id.'</td>';
                $strHtml .= '<td>'.$Producer->isReturned.'</td>';
                $strHtml .= '<td><a class="icon-1" href="'.$view->baseUrl().'/Producer/edit/id/'.$Producer->Producer_id.'"/>
                                <a class="icon-5" href="'.$view->baseUrl().'/Producer/Producerdt/id/'.$Producer->Producer_id.'"/>
                             <a class="icon-2" href="'.$view->baseUrl().'/Producer/delete/id/'.$Producer->Producer_id.'"/></td>';
                $strHtml .= '</tr>';
            }
        }
        
        $strHtml .= '</table>';
        return $strHtml;
    }
}
?>

